<!doctype html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="css/style.css" />
		<style>
			.ctn{
				padding-bottom: 0 !important;
				background-color: #1D1D1D;
			}
			.mui-bar-nav {
			    top: 0;
			    -webkit-box-shadow: 0 1px 6px #1D1D1D;
			     box-shadow: 0 1px 6px #1D1D1D; 
			}
		</style>
	</head>
	<body class="optionalPage ctn">
		<!--navBar-->
		<header class="mui-bar mui-bar-nav">
			<span class="mui-action-back mui-icon mui-icon-arrowleft"></span>
			<h1 class="mui-title">当日交易</h1>
		</header>
		<!--contInner-->
		<div class="contInner trade_title" >
			<ul class="order_title">
					<li class="mui-col-sm-4 mui-col-xs-4 deal_name">
						<span>名称</span>
					</li>
					<li class="mui-col-sm-2 mui-col-xs-2">
						<span>成本/订单</span>
					</li>
					<li class="mui-col-sm-2 mui-col-xs-2">
						<span>成交量/方向</span>
					</li>
					<li class="mui-col-sm-4 mui-col-xs-4">
						<span>状态/时间</span>
					</li>
				</ul>
			<!--------------------撤单---------------------------------->
			<div class=" mui-content part ctn" >
				<div class="mui-row" id="day_lists">
				</div>
			</div>
		</div>
			

	</body>
	<script src="js/mui.min.js"></script>
	<script src='libs/easymob-webim-sdk/jquery-1.11.1.js'></script>
	<script >jQuery.noConflict()</script>
	<script src='js/mstock.js'></script>
	<script src='js/configs.js'></script>
	<script src='json/all.js'></script>
	<script type="text/javascript">
		mui.init();
		var _data ={
			account:account,
			billStatus:4
		}
		jQuery.ajax({
			type:'post',
			url:server.stockToday,
			data:_data,
			beforeSend:function(){
				console.log(_data)
			},
			success:function(data){
                //处理成功返回的数据
                console.log(data);
             	for(i=0;i<data.data.length;i++){
             		var stockCode=data.data[i].stockCode;
	                var stockName=data.data[i].stockName;
	             	var price=data.data[i].price;
	             	var count=data.data[i].count;
	                var dealTime=data.data[i].dealTime||'未知';
	                
	                var _src,_tradeType,_priceType;
	                switch(data.data[i].tradingType){
	                	case 0:
	                		_tradeType = '买';break;
	                	case 1:
	                		_tradeType = '卖';break;
	                	default:
	                		_tradeType = '未知';break;
	                }
	                switch(data.data[i].billType){
	                	case 0:
	                		_priceType = '市价';break;
	                	case 1:
	                		_priceType = '限价';break;
	                	default:
	                		_priceType = '未知';break;
	                }
	                switch(data.data[i].currency){
	                	case 1:
	                		_src = 'images/HK_20x15_@3x.png';break;
	                	case 2:
	                		_src = 'images/US_40_29.png';break;
	                	default:
	                		_src = '';break;
	                }
	              jQuery("#day_lists").append("<ul class='deal_logo' style='margin-bottom: 10px;;'><li class='mui-col-sm-4 mui-col-xs-4'style='text-align: left;'><img style='margin-top: 3px;height:15px;' src='"+_src+"' alt='' class='mui-pull-left'><span class='stockName'>"+stockName+"</span><br><span style='margin-left:20px;color:#515252;'>"+stockCode+"</span></li><li class='mui-col-sm-2 mui-col-xs-2' style='text-align: center;'><span>"+price+"</span><br><span style='font-size: 14px;color:#515252;'>"+_priceType+"<span></li><li style='text-align: center' class='mui-col-sm-2 mui-col-xs-2' style='text-align: center;'><span style='color:#DAAC32'>"+count+"</span><br><span style='font-size: 14px;color:#515252;'>"+_tradeType+"<span></li><li class='mui-col-sm-4 mui-col-xs-4 deal_logo4'><span>已成交</span><br><span>"+dealTime+"</span></li></ul>");
             	}
           },
           error:function(result){
           		console.log(result);
           }
		})
	</script>
</html>